import request from '@/utils/request'

/**
 * 登录请求
 * @param {*} data {mobile: , password: ,}
 */
export const reqLogin = (obj) => {
  return request({
    url: '/sys/login',
    method: 'post',
    data: obj
  })
}

/**
 * 获取用户基本资料
 */
export const reqUserInfo = () => {
  return request({
    method: 'post',
    url: '/sys/profile'
  })
}

/**
 * 获取用户个人信息 (为了显示头像)
 * @param {*} id userId
 * @returns
 */
export const reqGetBaseInfo = (id) => {
  return request({
    method: 'get',
    url: `/sys/user/${id}`
  })
}

